# @Time    :2025/3/22 22:38
"""
7）从键盘上获取学生成绩，判断成绩等级
	 >= 90 A
	[80~90) B
	[70~80) C
    [60~70) D
    <60    E
"""
score = int(input("请输入学生成绩:\n"))

# if score > 100 or score< 0:
#     print("输入的成绩不合法~")
# else:
#     if score >= 90:
#         print("A")
#     elif score >= 80:
#         print("B")
#     elif score>=70:
#         print("C")
#     elif score>=60:
#         print("D")
#     else:
#         print("E")

if score > 100 or score < 0:
    print("输入的成绩不合法~")
    exit(1)
else:
    grade = ""
    if score >= 90:
        grade = "A"
    elif score >= 80:
        grade = "B"
    elif score >= 70:
        grade = "C"
    elif score >= 60:
        grade = "D"
    else:
        grade = "E"
print(f"你的成绩{score}，对应是等级{grade}")
#print("该成绩%d 对应的等级是%s" % (score,grade))
